The present invention is a lightweight, service-oriented computer software framework and method that provides applications with a flexible means to access data from a datastore without the need to perform multiple datastore queries.
A company may have a number of different business units providing a variety of products and services such as long distance service, mobile phone service, cable television service, etc. Each business unit within the company providing these individual services may have a separate computing system hosting a variety of business applications, which in turn may interact with any number of lower level datastores to create, retrieve, update, and delete data processed by the application. Much of the data residing in the various datastores will be reference data, which for purposes of this application means persisted data that typically does not need to be modified often. Thus, users requiring access; to reference data typically require read-only access to such data. A need exists for an efficient way to access data, and in particular reference data, from a plurality of datastores residing across the various computing systems of an entire enterprise.
In the past, individual applications accessed reference data directly from a datastore. For example, to access reference data from a relational database, an application would make the necessary structured query language (SQL) calls to query the tables for the necessary data. The problem with this approach is that such calls would be specific to the table and database, which would require that they be rewritten if the table was modified or the database was changed. Furthermore, if a significant number of applications is each making a separate call to the datastore for data, the system can easily become overloaded, thus decreasing operational efficiency and response time. This is particularly a problem where multiple applications (or a plurality of users running the same application) are using similar data sets, as the datastore must respond to multiple calls for substantially the same data.
The current invention addresses the need for an enterprise-level framework and method to encapsulate the retrieval of data from a datastore, thereby minimizing the number of calls to and queries performed by the datastore. Multiple applications (or a plurality of users running the same application) are provided with a single interface to a cache of data, thereby improving data retrieval performance by greatly reducing the need for each application or user to call and query the datastore directly. Furthermore, the applications are isolated from the underlying datastores, thereby allowing changes to the underling data, datatables, or datastores without necessitating revision of the applications"" programming code.
The present invention relates to a computer software framework and method for accessing data from a datastore. The invention discloses a framework for accessing data from a datastore, comprising a datatable comprising data retrieved from a datastore; a first class object, a second class object, and a third class object populated with columns of data from the datatable, wherein the second class object is referenced by the first class object and wherein the third class object is referenced by the second class object; and a hashtable caching the first, second, and third class objects such that the first class object is stored as a key in the hashtable and the second and third class objects are the corresponding value of that key in the hashtable.
The invention further discloses a method for accessing data from a datastore, comprising the steps of creating a datatable comprising data retrieved from a datastore; populating a first class object, a second class object, and a third class object with columns of data from the datatable, wherein the second class object is referenced by the first class object and wherein the third class object is referenced by the second class object; and caching the first, second, and third class objects in a hashtable such that the first class object is stored as a key in the hashtable and the second and third class objects are the corresponding value of that key in the hashtable.